Several memory technologies are emerging, which are characterized by a limited lifetime, i.e., each memory location can be written a limited number of times, due to a wearing process that eventually leads to a malfunctioning memory location. One non-limiting example of such a memory technology is phase change memory (PCM). A phase-change material is one that exists in at least two stable phases with markedly different resistivity properties and that can be repeatedly cycled between these phases. In at least some such materials, the amorphous phase is characterized by a high electrical resistivity, while the crystalline phase (or phases) exhibit low resistivity. The change in resistivity can be as large as five orders of magnitude (a 10,000,000% difference).